Skip to content

LibWeb: Round replaced element destination rectangles consistently - #11196

Merged
gmta merged 1 commit into
LadybirdBrowser:masterfrom
gmta:libweb-replaced-element-rounding
Aug 19, 2026
Merged

LibWeb: Round replaced element destination rectangles consistently#11196
gmta merged 1 commit into
LadybirdBrowser:masterfrom
gmta:libweb-replaced-element-rounding

Conversation

@gmta

@gmta gmta commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Fixes #11158

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 81c2b3ee-5f75-425b-af65-cea1a23572c7

📥 Commits

Reviewing files that changed from the base of the PR and between c1502d4 and 5d98b8a.

📒 Files selected for processing (3)
  • Tests/LibWeb/Screenshot/input/out-of-line-svg-object-fitting.html
  • Tests/LibWeb/Screenshot/input/svg-image-fractional-placement.html
  • Tests/LibWeb/Screenshot/input/video-object-fit.html
🚧 Files skipped from review as they are similar to previous changes (1)
  • Tests/LibWeb/Screenshot/input/svg-image-fractional-placement.html

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

get_replaced_box_painting_area now builds the destination rectangle in CSS pixels and rounds it once before converting it to Gfx::IntRect. The change removes intermediate device-pixel rounding. Screenshot coverage adds fractional SVG placement and updates fuzzy pixel-count tolerances for affected cases.

Possibly related PRs

Merge Risk: ⚪ Minimal · up to 5d98b

This change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description references issue #11158, which directly matches the replaced-element rendering changes.
Linked Issues check ✅ Passed The changes consistently round replaced-element rectangles and add coverage for fractional SVG placement, addressing issue #11158.
Out of Scope Changes check ✅ Passed All code and test changes support fractional replaced-element rendering and regression coverage for issue #11158.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gmta
gmta force-pushed the libweb-replaced-element-rounding branch from c1502d4 to 5d98b8a Compare August 18, 2026 22:23

@AtkinsSJ AtkinsSJ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me, besides the existing test flake.

@gmta

gmta commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

Merging this regardless of the (pre-existing) flaky test detection.

@gmta
gmta merged commit 3491414 into LadybirdBrowser:master Aug 19, 2026
23 of 29 checks passed
@BenWiederhake

Copy link
Copy Markdown
Contributor

Thank you! <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bottom pixel of pixel-misaligned SVG gets clipped

3 participants